package com.heima.controller;

import com.heima.pojo.Role;
import com.heima.service.RoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 赵超
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/user-service/role")
public class RoleController {
    private final RoleService roleService;

    @GetMapping
    public List<Role> listAll() {
        return roleService.listAll();
    }
}
